package com.shop.mapper;

import com.shop.entity.Message;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * (Message)表数据库访问层
 *
 * @author makejava
 * @since 2020-11-21 12:11:05
 */
@Mapper
public interface MessageMapper extends BaseMapper<Message> {

    @Select("SELECT * FROM `order` WHERE id=#{intId} AND is_delete='0'")
    Order selectOrderStatusById(Integer intId);

    @Update("UPDATE `order` SET is_delete='1' WHERE id=#{intId}")
    Integer updateOrderStatus(Integer intId);
}